-- GENERATED SPELL FOR [Bonechewer Taskmaster] --


function spell0_23028(pUnit, Event) --@Disgruntled,Self--
pUnit:FullCastSpellOnTarget(40851,pUnit)
pUnit:RegisterEvent('Sorts_23028', 582, 1)
end

function spell1_23028(pUnit, Event) --@Fury,Self--
pUnit:FullCastSpellOnTarget(40845,pUnit)
pUnit:RegisterEvent('Sorts_23028', 633, 1)
end

function Sorts_23028(pUnit, Event)
local choix_sorts_23028 = math.random(0, 1)
if choix_sorts_23028 == 0 then
pUnit:RegisterEvent('spell0_23028', 1, 1)
end
if choix_sorts_23028 == 1 then
pUnit:RegisterEvent('spell1_23028', 1, 1)
end
end

function mob23028_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23028', math.random(1500, 3000), 1)
end

function mob23028_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23028_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23028_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23028, 1, 'mob23028_Action')
RegisterUnitEvent(23028, 2, 'mob23028_Leave')
RegisterUnitEvent(23028, 3, 'mob23028_Kill')
RegisterUnitEvent(23028, 4, 'mob23028_Die')
